function moduleClick(operate_id, event) {
    // 获取操作容器
    const container = document.getElementById('operate_container');
    // 删除已有的 iframe（如果存在）
    const existingIframe = container.querySelector('iframe.operate');
    if (existingIframe) {
        container.removeChild(existingIframe);
    }

    const container_small = document.getElementById('section-3-modal-body');
    const existingIframe_small = container_small.querySelector('iframe.operate');
    if (existingIframe_small) {
        container_small.removeChild(existingIframe_small);
    }

    // 创建新的 iframe 元素
    const newIframe = document.createElement('iframe');
    newIframe.className = 'operate';
//    newIframe.id = operate_id;  // 一个页面设计了两个operate，故不能设置统一的id
    newIframe.style.width = '100%';
    newIframe.style.height = 'calc(100vh - 7rem)';
    newIframe.style.border = 'none';
    // 根据传递的 operate_id 设置 src
    switch (operate_id) {
        case "operate1":
            newIframe.src = '/operate/overview_page/';
            break;
        case "operate2":
            newIframe.src = '/operate/data_page/';
            break;
        case "operate3":
            newIframe.src = '/operate/tactic_page/';
            break;
        case "operate4":
            newIframe.src = '/operate/factor_page/';
            break;
        case "operate5":
            newIframe.src = '/operate/fruit_page/';
            break;
        default:
            console.error("Invalid operate_id:", operate_id);
            return;
    }
    // 将新的 iframe 添加到容器中
    container.appendChild(newIframe);
    container_small.appendChild(newIframe.cloneNode(true));

}


window.moduleClick = moduleClick;








